package com.feign.coupon;


import com.feign.to.SkuReductionTo;
import com.feign.to.SpuBoundTo;
import com.feign.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * springCloud在服务与服务之间远程调用传输数据的时，
 * 在请求过程中将实体转换为json对象字符串，
 * 所以feign接口中的参数不一定要跟controller中的参数一致，
 * 只要实体的属性名一致就行。
 */
@FeignClient("mall-coupon")
public interface CouponFeignService {

    @PostMapping("coupon/spuBounds/save")
    R saveSpuBounds(@RequestBody SpuBoundTo spuBoundTo);

    @PostMapping("coupon/skuFullReduction/saveInfo")
    R saveSkuReduction(@RequestBody SkuReductionTo skuReductionTo);



}
